package gupao.concurrency.threads;

public class VolatileHsdis {

    volatile boolean stop;

    public boolean isStop() {
        return stop;
    }

    public void setStop(boolean stop) {
        this.stop = stop;
    }

    public static void main(String[] args){
        VolatileHsdis v = new VolatileHsdis();
        v.setStop(true);
        System.out.println(v.isStop());
    }
}
